#include "SMPPScInterfaceVersion.hpp"

using namespace smpp::pdu;

SrInterfaceVersion::SrInterfaceVersion(const quint8 nValue):
TLV(TLVtags::TAG_SC_INTERFACE_VERSION,1),_Value(nValue){}

SrInterfaceVersion::SrInterfaceVersion(
const SrInterfaceVersion &nSrInterfaceVersion):
TLV(nSrInterfaceVersion),_Value(nSrInterfaceVersion.getValue()){}

bool SrInterfaceVersion::operator ==(
	const SrInterfaceVersion &nSrInterfaceVersion) const{
	return (TLV::operator == (nSrInterfaceVersion) && 
			_Value == nSrInterfaceVersion.getValue());
}

bool SrInterfaceVersion::operator !=(
	const SrInterfaceVersion &nSrInterfaceVersion) const{
	return !this->operator == (nSrInterfaceVersion);
}

SrInterfaceVersion &SrInterfaceVersion::operator = (
	const SrInterfaceVersion &nSrInterfaceVersion){
	if(*this == nSrInterfaceVersion)
		return *this;
	TLV::operator = (nSrInterfaceVersion);
	_Value = nSrInterfaceVersion.getValue();
	return *this;
}

void SrInterfaceVersion::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 SrInterfaceVersion::getValue() const{
	return _Value;
}
